package com.example.demo.controller;

import com.example.demo.domain.Orderform;
import com.example.demo.domain.Result;
import com.example.demo.service.OrderformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/orderform")
public class OrderformController {

    @Autowired
    OrderformService orderformService;

    //查询所有
    @RequestMapping("/findAllOrderform")
    public Result findAllOrderform(){
        List<Orderform> list = orderformService.findAllOrderform();
        return Result.ok(list);
    }

    //删除房间订单信息
    @RequestMapping("/deleteOrderform")
    public Result deleteOrderform(Integer id){
        orderformService.deleteOrderform(id);
        return Result.ok();
    }
}
